export function getUserInfo (key) {
  try {
    const userInfo = uni.getStorageSync('hsb_user_info') || {}
		return key ? (userInfo[key] || '') : userInfo
  } catch (error) {
    return key ? '' : {}
  }
}

export function setUserInfo (userInfo = {}) {
	uni.setStorageSync('hsb_user_info', userInfo)
}

export function clearUserInfo () {
  uni.removeStorageSync('hsb_user_info')
}
